<!-- php:$title = "收货地址 - 会员中心" --><!-- include tpl=header title=$title -->
<div class="main">
	<!-- include tpl=block/breadcrumb -->
	<div class="left"><!-- include tpl=block/usercp_nav --></div>
	<div class="right">
		<div class="am-panel am-panel-default">
			<div class="am-panel-hd">收货地址</div>
			<table class="am-table am-table-centered am-table-hover ">
				<thead>
					<tr>
						<th colspan="2">收件人</th>
						<th class="am-text-left">地址</th>
						<th>联系方式</th>
						<th style="width:200px">操作</th>
					</tr>
				</thead>
				<tbody>
					<!-- loop from=$rslist key=$key value=$value -->
					<tr>
						<td>#{$value.id}</td>
						<td>{$value.fullname}</td>
						<td class="am-text-left">{$value.province}<!-- if $value.province != $value.city -->{$value.city}<!-- /if -->{$value.county}-{$value.address}</td>
						<td>{$value.mobile}<!-- if $value.mobile && $value.tel --> / <!-- /if -->{$value.tel}</td>
						<td>
							<div class="am-btn-group">
								<button type="button" onclick="$.address.edit('{$value.id}')" class="am-btn am-btn-default am-btn-xs">编辑</button>
								<button type="button" onclick="$.address.del('{$value.id}')" class="am-btn am-btn-danger am-btn-xs">删除</button>
								<!-- if !$value.is_default -->
								<button type="button" onclick="$.address.set_default('{$value.id}')" class="am-btn am-btn-primary am-btn-xs">设为默认</button>
								<!-- else -->
								<button type="button" class="am-btn am-btn-default am-btn-xs" disabled>默认地址</button>
								<!-- /if -->
							</div>
						</td>
					</tr>
					<!-- /loop -->
				</tbody>
			</table>
		</div>
		
		
		<!-- if $total < 30 -->
		<div class="am-panel-bd am-text-center">
			<button type="button" onclick="$.address.add()" class="am-btn am-btn-primary">添加地址</button>
		</div>
		<!-- /if -->
	</div>
	<div class="clear"></div>
</div>

<!-- include tpl=footer -->